$toc-btn-height: 60px;
$toc-back-color: #272822;

.toc-container{
  position: fixed;
  right: 0;
  top: 0;
  height: 100%;
  z-index: 20;
  width: 0;
  .toc-btn {
    float: right;
    position: relative;
    top: 40%;
    text-align: right;
    color: #fefefe;
    width: $toc-btn-height/2;
    overflow: auto;
    .arrow{
      cursor: pointer;
      display: block;

      &:after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        border: $toc-btn-height/2 transparent solid;
        border-right-color: $toc-back-color;
        z-index: -1;
      }

      & > span {
        color: #fff;
        line-height: $toc-btn-height;
      }
    }
  }
  .toc {
    float: right;
    height: 100%;
    background-color: $toc-back-color;
    padding: 1rem; 
    width: 15rem;
    margin-right: -15rem;
    transition: margin 0.3s linear;

    > ul {
      margin: 0;
      > ul {
        margin-left: 1rem;
      }
    }
    li{
      list-style: none;
    }
    a {
      color:  #D5D5D5;
      text-decoration: none;
      &:hover {
        color: $primary-color;
      }
    }

    .header {
      margin-bottom: 10px;
      padding-bottom: 10px;
      border-bottom: #9c9c9c 1px solid;
      color: #eee;
    }
  }

  &.open .toc{
    margin-right: 0;
  }
}
